﻿using System;

namespace Lilifei.Custom.Attributes.ORM
{
    /// <summary>
    ///表结构信息特性, TableName：表名称，KeyName：主键名称，IsIdentity：是否自增
    /// </summary>
    [AttributeUsage(AttributeTargets.Class)]
    public class TableSchemaAttribute : Attribute
    {
        /// <summary>
        /// 表名
        /// </summary>
        public string TableName { get; set; }

        /// <summary>
        /// 主键名称,默认Id
        /// </summary>
        public string KeyName { get; set; } = "Id";

        /// <summary>
        /// 是否自增,默认是
        /// </summary>
        public bool IsIdentity { get; set; } = true;
    }
}
